package com.example.demo.entity.observer;

/**
 * @author xkx
 * @date 2018/12/24
 */
public class BoyB extends Boy implements Observer {


  public BoyB(Subject subject) {
    subject.addObserver(this);
  }

  @Override
  public void darlingBehavior() {
    System.out.println("everything will be in a dream ");
  }

  @Override
  public void update() {
    darlingBehavior();
  }
}
